/*
 *  RIBuildIndexSVPR.java
 *
 */

package at.ofai.gate.riplugin2;


import gate.*;
import gate.creole.*;
import gate.creole.metadata.*;
import java.io.File;

// document names:
// gatedocid.sectionid where gatedocid is gatedocnr:gatedocname and
// sectionid is annotationnr:annotationname:fromoffset:tooffset


/** 
 * This PR must be run in a controller, not a corpus controller.
 */
public abstract class RIBuildIndexSVPR
  extends AbstractProcessingResource
  implements ProcessingResource
{

  @CreoleParameter(comment = "Vector dimensions", defaultValue="1000")
  @Optional
  @RunTime
  public void setVectorDimensions(Integer dims) {
    this.vectorDimensions = dims;
  }
  public Integer getVectorDimensions() {
    return this.vectorDimensions;
  }
  protected Integer vectorDimensions = 1000;

  @CreoleParameter(comment = "Seed (non-zero) dimensions", defaultValue="10")
  @Optional
  @RunTime
  public void setSeedDimensions(Integer dims) {
    this.seedDimensions = dims;
  }
  public Integer getSeedDimensions() {
    return this.seedDimensions;
  }
  protected Integer seedDimensions = 10;

  @CreoleParameter(comment = "Minimum term frequency", defaultValue="1")
  @Optional
  @RunTime
  public void setMinTermFrequency(Integer freq) {
    this.minTermFrequency = freq;
  }
  public Integer getMinTermFrequency() {
    return this.minTermFrequency;
  }
  protected Integer minTermFrequency = 1;

  @CreoleParameter(comment = "The Lucene index LR to use")
  @RunTime
  public void setIndexLuceneLR(RIIndexLuceneLR index) {
    this.indexLuceneLR = index;
  }
  public RIIndexLuceneLR getIndexLuceneLR() {
    return this.indexLuceneLR;
  }
  protected RIIndexLuceneLR indexLuceneLR = null;



  protected File luceneIndexDir = null;
  protected File svTermIndex = null;
  protected File svDocumentIndex = null;

  /**
   * Initialize this resource: check parameters 
   *
   * @return
   * @throws ResourceInstantiationException
   */
  @Override
  public Resource init() throws ResourceInstantiationException {
    return this;
  }

  
} // class RIBuildSVPR
